<template>
	<view class="content">
		<view class="row list">
			<view class="col-6">
				电子发票
			</view>
			<view class="col-18 t_right">
				{{contents.isStatus == 0 ? '开票中' : '已开票'}}
			</view>
		</view>
		<view class="row list">
			<view class="col-6">
				开票方
			</view>
			<view class="col-18 t_right">
				河南立程起才汽车租赁有限公司
			</view>
		</view>
		<view class="row list">
			<view class="col-6">
				抬头类型
			</view>
			<view class="col-18 t_right">
				{{contents.invoiceType == 1 ? '企业' :'个人'}}
			</view>
		</view>
		<view class="row list">
			<view class="col-6">
				发票抬头
			</view>
			<view class="col-18 t_right">
				{{contents.companyName}}
			</view>
		</view>
		<view class="row list" v-if="contents.invoiceType == 1">
			<view class="col-6">
				公司税号
			</view>
			<view class="col-18 t_right">
				{{contents.dutyParagraph}}
			</view>
		</view>
		<view class="row list">
			<view class="col-6">
				发票备注
			</view>
			<view class="col-18 t_right">
				{{contents.remarks }}
			</view>
		</view>
		<view class="row list">
			<view class="col-6">
				电子邮箱
			</view>
			<view class="col-18 t_right">
				{{contents.email}}
			</view>
		</view>
		<view class="row list">
			<view class="col-6">
				申请时间
			</view>
			<view class="col-18 t_right">
				{{contents.createTime}}
			</view>
		</view>
		<view class="row lcmx">
			<view class="lcmxtc row t_size_28">
				<view class="col-12">
					发票总额<text>{{contents.money}}</text>元
				</view>
				<view class="col-12 t_right">
					共<text>{{contents.sheet }}</text>张
				</view>
			</view>
			<view class="row lcmxlist" v-for="(item,index) in contents.orderList" :key="index">
				<view class="row listsj">
					<view class="col-15">
						{{item.createTime}}
					</view>
					<view class="col-9 t_right">
						{{item.orderType == 1 ? '城际专车' : '市内专车'}}
					</view>
				</view>
				<view class="col-2 listnrleft">
					<view class="col-24 lvdian">
						·
					</view>
					<view class="shuxian">
			
					</view>
					<view class="col-24 landian">
						·
					</view>
					<view class="col-24 hongdian">
						·
					</view>
				</view>
				<view class="col-22 listnrcenter">
					<view class="col-24 qidian">
						{{item.orderOnPoint}}
					</view>
					<view class="col-24 zhongdian">
						{{item.orderOffPoint}}
					</view>
					<view class="col-24 jinqian">
						<text>{{item.orderMoney}}</text>元
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				invoiceId: 0,
				contents: {
					companyName: "测试用户",
					createTime: "2022-01-24 11:39:24",
					dutyParagraph: "",
					email: "45286@qq.com",
					id: 2,
					invoiceType: 2,
					invoicingCompany: "河南立程起才汽车租赁有限公司",
					money: 0,
					orderList: [],
					remarks: "备注"
				}
			}
		},
		onLoad(option) {
			this.invoiceId = option.id
			this.load();
		},
		methods:{
			async load(){
				let res = await this.$api.request(this.$api.invoice.getinfo,{invoiceId:this.invoiceId});
				if(res){
					this.contents = res;
				}
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #f5f5f5;
	}
	.content{
		padding-top: 20rpx;
	}
	.list{
		width: 92%;
		padding: 0 4%;
		height: 96rpx;
		line-height: 96rpx;
		color: #B3B3B3;
		font-size: 28rpx;
		background-color: #FFFFFF;
		border-bottom: 1rpx solid #ededed;
		.col-18{
			color: #333333;
		}
	}
	.lcmx{
		width: 92%;
		padding: 9rpx 4%;
		margin-top: 20rpx;
		background-color: #FFFFFF;
		.lcmxtc{
			color: #333333;
			height: 89rpx;
			line-height: 89rpx;
			text{
				color: #FF2626;
			}
		}
	}
	.lcmxlist{
		width: 94%;
		padding: 15rpx 3%;
		margin-bottom: 20rpx;
		border-radius: 15rpx;
		box-shadow: 0px 5rpx 20rpx 0px #EDEDED;
		.listsj {
			height: 61rpx;
			line-height: 61rpx;
			color: #999999;
			.col-9{
				color: #333333;
			}
		}
		.listnrleft {
			height: 150rpx;
			padding: 15rpx 0;
		
			.lvdian,
			.landian {
				height: 15rpx;
				line-height: 15rpx;
				font-size: 45rpx;
				font-weight: bold;
				color: #6CBF30;
				margin-top: 20rpx;
			}
		
			.shuxian {
				width: 1px;
				height: 40rpx;
				line-height: 40rpx;
				margin-left: 5.5px;
				border-left: 1px dotted #999999;
			}
		
			.landian {
				margin-top: 0;
				color: #07B0FF;
			}
		
			.hongdian {
				padding-top: 40rpx;
				height: 20rpx;
				line-height: 20rpx;
				font-size: 45rpx;
				font-weight: bold;
				color: #FF2626;
			}
		}
		
		.listnrcenter {
			color: #333333;
			height: 150rpx;
			padding: 15rpx 0;
		
			.qidian {
				padding-top: 10rpx;
				height: 30rpx;
				line-height: 30rpx;
				font-size: 28rpx;
			}
		
			.zhongdian {
				padding-top: 25rpx;
				height: 30rpx;
				line-height: 30rpx;
				font-size: 28rpx;
			}
		
			.jinqian {
				padding-top: 30rpx;
				height: 30rpx;
				line-height: 30rpx;
				font-size: 28rpx;
		
				text {
					color: #FF2626;
					font-size: 39rpx;
					font-weight: bold;
				}
			}
		}
		
		.listright {
			height: 150rpx;
			line-height: 150rpx;
			padding: 15rpx 0;
		}
	}
</style>
